﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using MySql.Data.MySqlClient;

namespace QD.DataBase.DBHelper
{
    public class MYSQLHelper : SQLHelper
    {
        private static MYSQLHelper _instance = null;
        public static MYSQLHelper Instance
        {
            get
            {
                if (_instance == null)
                    _instance = new MYSQLHelper();
                return _instance;
            }
        }

        public override IDbConnection CreateConnection(string connectionString)
        {
            return new MySqlConnection(connectionString);
        }

        public override IDbDataAdapter CreateAdapter(IDbCommand cmd)
        {
            return new MySqlDataAdapter(cmd as MySqlCommand);
        }

        public override IDbCommand CreateCommand()
        {
            return new MySqlCommand();
        }


    }
}